package com.qf.aspect;

import org.aspectj.lang.ProceedingJoinPoint;

/**
 * @Description: 公用常量
 * @Data: 2022/8/31 23:21
 * @Pacakge: com.qf.aspect
 * @ClassName: MyAspect
 * @Author: fan
 * 切面类:增强方法
 */
public class MyAspect {
    public void before(){
        System.out.println("目标方法之前执行...");
    }
    public void after(){
        System.out.println("目标方法之后执行....");
    }
    public void around(ProceedingJoinPoint proceedingJoinPoint){
        System.out.println("环绕之前执行...");
        try {
            proceedingJoinPoint.proceed();
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }
        System.out.println("环绕之后执行...");
    }
}
